<?php

/**
 * Metodopago form base class.
 *
 * @method Metodopago getObject() Returns the current form's model object
 *
 * @package    courier
 * @subpackage form
 * @author     Your name here
 */
abstract class BaseMetodopagoForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'met_id'           => new sfWidgetFormInputHidden(),
      'met_numerotdc'    => new sfWidgetFormInputText(),
      'met_mesvence'     => new sfWidgetFormInputText(),
      'met_aniovence'    => new sfWidgetFormInputText(),
      'met_codseguridad' => new sfWidgetFormInputText(),
      'met_cliente'      => new sfWidgetFormPropelChoice(array('model' => 'Cliente', 'add_empty' => false)),
    ));

    $this->setValidators(array(
      'met_id'           => new sfValidatorChoice(array('choices' => array($this->getObject()->getMetId()), 'empty_value' => $this->getObject()->getMetId(), 'required' => false)),
      'met_numerotdc'    => new sfValidatorString(array('max_length' => 20)),
      'met_mesvence'     => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
      'met_aniovence'    => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
      'met_codseguridad' => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
      'met_cliente'      => new sfValidatorPropelChoice(array('model' => 'Cliente', 'column' => 'cli_id')),
    ));

    $this->widgetSchema->setNameFormat('metodopago[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Metodopago';
  }


}
